package com.tulele.vtool.model.reqEntity;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * 发送订阅消息实体
 */
@Getter
@Setter
public class WxMpSubscribeMessageInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 接收者（用户）的 openid
     */
    private String toUser;

    /**
     * 所需下发的订阅模板id
     */
    private String templateId;

    /**
     * 跳转网页时填写
     */
    private String page;

    /**
     * 跳转小程序时填写，格式如{ "appid": "APPID", "pagepath": "index?foo=bar" }
     */
    private WxMpSubscribeMessageInfo.MiniProgram miniProgram;

    /**
     * 模板内容，格式形如 { "key1": { "value": any }, "key2": { "value": any } }
     */
    private WxMpSubscribeMessageInfo.SubscribeMessageInfo data;

    @Getter
    @Setter
    public static class MiniProgram implements Serializable {
        private static final long serialVersionUID = 5465030224520266487L;

        private String appid;

        private String pagepath;
    }

    @Getter
    @Setter
    public static class SubscribeMessageInfo implements Serializable {
        private ValueInfo thing3;

        private ValueInfo date1;

        private ValueInfo date2;

        private ValueInfo time4;

        @Getter
        @Setter
        private static class ValueInfo {
            private String value;
        }
    }
}
